package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the AnteGameType table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="AnteGameType"
 */

public abstract class BaseAnteGameType  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "AnteGameType";
	public static String PROP_GAME_TYPE_NAME = "gameTypeName";
	public static String PROP_GAME_TYPE_I_D = "GameTypeID";
	public static String PROP_GAME_CLASS = "gameClass";


	// constructors
	public BaseAnteGameType () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAnteGameType (java.lang.Short gameTypeID) {
		this.setGameTypeID(gameTypeID);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAnteGameType (
		java.lang.Short gameTypeID,
		java.lang.String gameClass,
		java.lang.String gameTypeName) {

		this.setGameTypeID(gameTypeID);
		this.setGameClass(gameClass);
		this.setGameTypeName(gameTypeName);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Short gameTypeID;

	// fields
	private java.lang.String gameClass;
	private java.lang.String gameTypeName;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="GameTypeID"
     */
	public java.lang.Short getGameTypeID () {
		return gameTypeID;
	}

	/**
	 * Set the unique identifier of this class
	 * @param gameTypeID the new ID
	 */
	public void setGameTypeID (java.lang.Short gameTypeID) {
		this.gameTypeID = gameTypeID;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: GameClass
	 */
	public java.lang.String getGameClass () {
		return gameClass;
	}

	/**
	 * Set the value related to the column: GameClass
	 * @param gameClass the GameClass value
	 */
	public void setGameClass (java.lang.String gameClass) {
		this.gameClass = gameClass;
	}



	/**
	 * Return the value associated with the column: GameTypeName
	 */
	public java.lang.String getGameTypeName () {
		return gameTypeName;
	}

	/**
	 * Set the value related to the column: GameTypeName
	 * @param gameTypeName the GameTypeName value
	 */
	public void setGameTypeName (java.lang.String gameTypeName) {
		this.gameTypeName = gameTypeName;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof AnteGameType)) return false;
		else {
			AnteGameType anteGameType = (AnteGameType) obj;
			if (null == this.getGameTypeID() || null == anteGameType.getGameTypeID()) return false;
			else return (this.getGameTypeID().equals(anteGameType.getGameTypeID()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getGameTypeID()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getGameTypeID().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}